package com.yedean.factory.context.event;

import com.yedean.factory.BeanFactory;
import com.yedean.factory.context.ApplicationEvent;

/**
 * SimpleApplicationEventMulticaster
 *
 * @author yedean
 * @date 2022/7/15
 */
public class SimpleApplicationEventMulticaster extends AbstractApplicationEventMulticaster{
    public SimpleApplicationEventMulticaster(BeanFactory beanFactory) {
        super(beanFactory);
    }

    @Override
    public void multicastEvent(ApplicationEvent event) {
       getApplicationListeners(event).forEach(x->x.onApplicationEvent(event));
    }
    
}
